Kinetis SDK API Reference Manual  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
FreeRTOS Abstraction Layer

The Kinetis SDK provides the FreeRTOS Abstraction Layer for synchronization, mutual exclusion, message queue, etc. More...

Data Structures

struct  EVENT_FREE_RTOS
 Type for an event group object in FreeRTOS. More...
 

Macros

#define kSyncWaitForever   0xFFFFFFFFU
 Constant to pass as timeout value in order to wait indefinitely. More...
 
#define FSL_RTOS_CURRENT_TASK   ((task_handler_t)NULL)
 Macro passed to the task_destroy function to destroy the current task. More...
 

Typedefs

typedef xTaskHandle task_handler_t
 Type for a task handler, returned by the task_create function. More...
 
typedef portSTACK_TYPE task_stack_t
 Type for a task stack. More...
 
typedef pdTASK_CODE task_t
 Type for a task function. More...
 
typedef xSemaphoreHandle lock_object_t
 Type for a lock object. More...
 
typedef xSemaphoreHandle sync_object_t
 Type for a synchronization object. More...
 
typedef uint32_t event_group_t
 Type for an event group object. More...
 
typedef EVENT_FREE_RTOS event_object_t
 Type for an event group object.
 
typedef xQueueHandle msg_queue_t
 Type for a message queue declaration and creation. More...
 
typedef xQueueHandle msg_queue_handler_t
 Type for a message queue handler.
 
typedef void * msg_queue_item_t
 Type for a message queue item.
 

Synchronization

#define sync_object_declare(obj)   sync_object_t obj=(sync_object_t)0
 Create the synchronization object. More...
 

Resource locking

#define lock_object_declare(obj)   lock_object_t obj=(lock_object_t)0
 Create the locking object. More...
 

Thread management

#define FSL_RTOS_TASK_DEFINE(task, stackSize, name, usesFloat)
 Creates a task descriptor that is used to create the task with task_create. More...
 
#define task_create(task, priority, param, handler)
 Creates and sets the task to active. More...
 

Message queues

#define MSG_QUEUE_DECLARE(name, number, size)   xQueueHandle name
 This macro statically reserves the memory required for the queue. More...
 

Critical Sections

#define rtos_enter_critical   taskENTER_CRITICAL
 Ensures the following code will not be preempted.
 
#define rtos_exit_critical   taskEXIT_CRITICAL
 Allows preemption.
 

Data Structure Documentation

struct EVENT_FREE_RTOS

Data Fields

event_group_t flags
 Event flags.
 
event_clear_type clearType
 Auto clear or manual clear.
 
xSemaphoreHandle flagsSem
 Semaphore to protect flags.
 

Macro Definition Documentation

#define kSyncWaitForever   0xFFFFFFFFU
#define FSL_RTOS_CURRENT_TASK   ((task_handler_t)NULL)
#define sync_object_declare (   obj)    sync_object_t obj=(sync_object_t)0

To be used instead of a standard declaration.

Parameters
objThe sync object to create.
#define lock_object_declare (   obj)    lock_object_t obj=(lock_object_t)0

To be used instead of a standard declaration.

Parameters
objThe lock object to create.
#define FSL_RTOS_TASK_DEFINE (   task,
  stackSize,
  name,
  usesFloat 
)
Value:
static signed portCHAR fslTaskName_##task[]=name; \
static int fslTaskStackSize_##task = stackSize
Parameters
taskThe task function.
stackSizeNumber of elements in the stack for this task.
nameString to assign to the task.
usesFloatBoolean that indicates whether the task uses the floating point unit.
#define task_create (   task,
  priority,
  param,
  handler 
)
Value:
(uint8_t *)fslTaskName_##task, \
fslTaskStackSize_##task, \
NULL, \
priority, \
param, \
false, \
handler)
fsl_rtos_status __task_create(task_t task, uint8_t *name, uint16_t stackSize, task_stack_t *stackMem, uint16_t priority, void *param, bool usesFloat, task_handler_t *handler)
Create a task.
Parameters
taskThe task function.
priorityInitial priority of the task.
paramPointer to be passed to the task when it is created.
handlerReturns the identifier to be used afterwards to destroy the task.
Return values
kSuccessThe task was successfully created.
kErrorCreation of task failed.
#define MSG_QUEUE_DECLARE (   name,
  number,
  size 
)    xQueueHandle name
Parameters
nameIdentifier for the memory region.
numberNumber of elements in the queue.
sizeSize of every elements in words.

Typedef Documentation

typedef xTaskHandle task_handler_t
typedef portSTACK_TYPE task_stack_t
typedef pdTASK_CODE task_t
typedef xSemaphoreHandle lock_object_t
typedef xSemaphoreHandle sync_object_t
typedef uint32_t event_group_t
typedef xQueueHandle msg_queue_t